enum Status {
    SENT = 1,
    FAILED = 2,
    PENDING = 3,
    SENDING = 4,
}

const getStatusName = (status: Status) => {
    if (status == Status.SENT) {
        return 'Sent';
    } else if (status == Status.FAILED) {
        return 'Failed';
    } else if (status == Status.PENDING) {
        return 'Pending';
    } else if (status == Status.SENDING) {
        return 'Sending';
    } else {
        return 'Not Found';
    }
};

const getStatusMUIColor = (status: Status) => {
    if (status == Status.SENT) {
        return 'success';
    } else if (status == Status.FAILED) {
        return 'error';
    } else if (status == Status.PENDING) {
        return 'default';
    } else if (status == Status.SENDING) {
        return 'primary';
    } else {
        return 'error';
    }
};

export { getStatusMUIColor, getStatusName, Status };
